package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.entity.Workers;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 员工表 Mapper 接口
 * </p>
 *
 * @author Mr.wyy
 * @since 2024-05-30
 */
@Mapper
public interface WorkersMapper extends BaseMapper<Workers> {

    /**
     * 以ID查询
     * @param workersId
     * @return
     */
    @Select("SELECT * FROM workers WHERE workers_id = #{workersId} AND flag = 1")
    public Workers selectByWorkersId(Integer workersId);

    /**
     * 以条件查询
     * @param workers
     * @return
     */
    public List<Workers> selectByCriteria(Workers workers);

/*    *//**
     * 查询所有员工信息
     * @return
     *//*
    @Select("SELECT * FROM workers WHERE flag = 1")
    public List<Workers> selectAllWorkers();*/
}
